package com.yh.controller;

import com.yh.service.IProductService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yh.common.BaseResult;

/**
 * @author yh
 */
@RestController
@RequestMapping("/api/product")
@AllArgsConstructor
public class ProductController {
    private final IProductService productService;
    @GetMapping("/buyProducts")
    public BaseResult buyProducts(Long productId,Long skuId,Integer nums){
        productService.buyProducts(productId,skuId,nums);
        return BaseResult.success();
    }
}
